<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Options</title>

<link href="options.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="container">
<h1>
	<img src='images/tickletab-48.png' style="vertical-align: middle;margin: 1em" title="Tickle Tab" alt="Tickle Tab"/>Tickle Tab
</h1>
<section>
<section-head>What is this about?</section-head>

<section-content>TickleTab implements the Tickler idea of David Allen's GTD. 
It saves all the tabs you don't need right now and presents them again at the specified date.
</section-content>
</section>
<section>
<section-head>Options</section-head>

<section-content>
	A value for an ignored option: <input id="txtOption01" type="text" oninput="markDirty()">
</section-content>
</section>

<div>
  <input type="button" id="btnSave" onclick="save()" value="Save"/>
</div>
</div>

<script>
var txtOption01;
var btnSave;

init();

function init() {
  txtOption01 = document.getElementById("txtOption01");
  btnSave = document.getElementById("btnSave");

  txtOption01.value = localStorage.sOption01 || "";
  markClean();
}

function save() {
  localStorage.sOption01 = txtOption01.value;
  
  markClean();

  chrome.extension.getBackgroundPage().init();
}

function markDirty() {
  btnSave.disabled = false;
}

function markClean() {
  btnSave.disabled = true;
}
</script>
</body>

</html>